﻿@model RjContentModelBase
@{
    <ul class="ulTop">
        <li>
            @Model.Name
            @{
                // get published children
                var children = Model
                    .GetTypedChildren<ProggyCoreContentModelBase>()
                    .Where(x=>!x.HideFromMenu).ToList();
                    
            }
            @if (children.Count > 0)
            {
                <ul>
                    @foreach (var child in children)
                    {
                        <li>@Html.ContentActionLink(child)</li>
                    }
                </ul>
            }
        </li>
    </ul>
    
    // get parent
    var parent = Model.GetAbstractParent();

    // check
    if (parent != null)
    { 
    <small>@Html.ContentActionLink("Back to " + parent.Name + " >>", parent)</small>
    }
}
